package org.xhy.ruleengine.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.xhy.ruleengine.groovy.GroovyClassLoader;
import org.xhy.ruleengine.groovy.IGroovyClassLoader;
import org.xhy.ruleengine.services.MemoryDecisionTreeController;

/**
 * @description:
 * @gitee: https://gitee.com/XhyQAQ
 * @copyright: B站: https://space.bilibili.com/152686439
 * @Author: Xhy
 * @CreateTime: 2024-06-23 14:54
 */
@Configuration
public class RuleEngineAutoConfig {


    @Bean
    public IGroovyClassLoader iGroovyClassLoader(){
        return new GroovyClassLoader();
    }

    @Bean
    public MemoryDecisionTreeController memoryDecisionTreeController(IGroovyClassLoader groovyClassLoader){
        return new MemoryDecisionTreeController(groovyClassLoader);
    }
}
